package com.lanou3g.ptp.warning.mapper;

import com.lanou3g.ptp.entity.Warning;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface WarningMapper {

    @Insert("INSERT INTO warning(task_id,student_id,`type`,content,`status`,create_time,update_time) " +
            "VALUES(#{taskId},#{studentId},#{type},#{content},#{status},#{createTime},#{updateTime})")
    int insert(Warning warning);

    List<Warning> findByTaskIds(List<Long> taskIds);

    List<Warning> findExistWarning(Warning warning);
}
